package com.zdya.bigloghandler;

import com.google.gson.Gson;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.util.Base64;
import java.util.Map;

public class JsonFileParse {

    public static void main(String[] args) throws IOException {
        Gson gson = new Gson();
        Map map = gson.fromJson(new String(Files.readAllBytes(Paths.get("C:\\Users\\ZHY\\Desktop\\新建文本文档123123123.pdf")), "UTF-8"), Map.class);
        String str = (String) map.get("pdfBase64");
        Files.write(Paths.get("C:\\Users\\ZHY\\Desktop\\pdf12.pdf"), Base64.getDecoder().decode(str), StandardOpenOption.CREATE);
    }

}
